<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
		<!-- <script src="https://cdn.bootcss.com/template_js/0.8.0/template.min.js"></script> -->
		<script src="js/app_flow.js"></script>
		<link href="https://cdn.bootcss.com/twitter-bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="css/override-element-ui.css" />
		<link rel="stylesheet" type="text/css" href="css/workflow.css" />
		
		<link rel="stylesheet" type="text/css" href="css/ss.css" />
		<style type="text/css">
			.dingflow-design .add-node-btn-box:before {
				content: "";
				position: absolute;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
				z-index: -1;
				margin: auto;
				width: 2px;
				height: 100%;
				background-color: #cacaca;
			}
		</style>
	</head>
	<body>
		<div id="app">
			
		</div>
		<script type="text/javascript">
			var flow=new FlowC($("#app"),function(data){
				//触发保存按钮
			},function(data){
				//触发取消按钮
			})
			// var data$=data
			flow.draw({
				"type": 1,
				"id": "1586314261149_9917",
				"title": "发起人",
				"content": "所有人",
				"conditionList": [],
				"others": {},
				"childNode": {
					"type": 2,
					"id": "1586314264851_1527",
					"title": "审批人",
					"content": "请选择",
					"conditionList": [],
					"others": {},
					"childNode": {
							"id": "1586314261149_2821",
							"type": 4,
							"conditionList": [{
								"type": 5,
								"id": "1586314261149_4384",
								"title": "条件1",
								"content": "条件xxx",
								"priority": 1,
							}, {
								"type": 5,
								"id": "1586314261149_328",
								"title": "条件2",
								"content": "条件2xxx",
								"priority": 2
							}],
							"childNode": {
								"type": 2,
								"id": "1586314261149_7644",
								"title": "审批人",
								"content": "直接上级",
								"conditionList": [],
								"others": {}
							}
						}
				}
			});
			
			
		</script>
	</body>
</html>




<!-- 
 
使用方法
1. 实例化
 var flow=new FlowC($("#app"),function(data){
 	//触发保存按钮
 },function(data){
 	//触发取消按钮
 })
 
 2. 绘制数据，可以传入数据也可以不传入
 this.data = {
 		type: 1, //type 1发起人节点，2，审批人节点，3，抄送人节点，4，空节点，5，条件节点
 		id: newIndex(),
 		title: "发起人",
 		content: "所有人",
 		conditionList: [],
 		others: {},//此字段用于存放业务字段
 		childNode:{
 			id:newIndex(),
 			type:4,
 			conditionList: [{
 				type:5,id:newIndex(),title:"条件1",content:"条件xxx",priority:1},{
 				type:5,id:newIndex(),title:"条件2",content:"条件2xxx",priority:2}],
 			childNode:{
 				type: 2,
 				id: newIndex(),
 				title: "审批人",
 				content: "直接上级",
 				conditionList: [],
 				others: {}
 			}
 		}
 
 	};
 }
 
 3.取数据，可以直接使用
 flow.data取出结果数据
 
 -->